<?php
date_default_timezone_set('Asia/Ho_Chi_Minh');
// Define application environment
defined ( 'APPLICATION_ENV' ) || define ( 'APPLICATION_ENV', (getenv ( 'APPLICATION_ENV' ) ? getenv ( 'APPLICATION_ENV' ) : 'production') );

// Define base path obtainable throughout the whole application
defined ( 'BASE_PATH' ) || define ( 'BASE_PATH', realpath ( dirname ( dirname ( __FILE__ ) ) ) );

// Define path to application directory
defined ( 'APPLICATION_PATH' ) || define ( 'APPLICATION_PATH', BASE_PATH . '/application' );

// Define path to library directory
defined ( 'LIBRARY_PATH' ) || define ( 'LIBRARY_PATH', BASE_PATH . '/library' );

// Typically, you will also want to add your library/ directory
// to the include_path, particularly if it contains your ZF installed
set_include_path ( implode ( PATH_SEPARATOR, array (
	LIBRARY_PATH, get_include_path () 
) ) );

//load library
require_once 'Zend/Application.php';

$environment = APPLICATION_ENV;
$options = APPLICATION_PATH . '/configs/administrator.ini';
$application = new Zend_Application ( $environment, $options );
$application->bootstrap ()->run ();